約 391,408 件
https://w.atwiki.jp/kakis/pages/10620.html
上位標目 第九期新生アルカ概説 比較 再帰動詞_na14 再帰動詞2008/03/21 (金) 12 43 36のコピー アルカには「座らせる」はあっても「座る」という単語はない。 「私は座る」は「私は自分を座らせる」というフランス語のような表現をする。 an skin nos(私は自分を座らせる→私は座る) ただし、この手の動詞はyulにnosが来るのが無標であるから、通常nosは省略される。 従って、通常はan skinという。 はっきり再帰だと言いたいときに、nos を付ける。 再帰動詞を取るものは、姿勢動詞が多い。 寝る、座る、立つなどから、あくびをする、笑うなどの一人で完結する身体動作まで、さまざまなものが再帰動詞となる。 上位標目 第九期新生アルカ概説 比較 再帰動詞_na14
https://w.atwiki.jp/it_certification/pages/133.html
目的 構成 検証1 検証環境構築 検証2 timers bgpによる設定 検証3 neighbor timersによる設定 検証4 最小送信間隔の確認 検証5 最小送信間隔の設定 検証6 bgp fast-external-fallover 検証7 bgp dampening 検証8 経路毎のdampening定義 目的 BGPのパフォーマンスチューニングを行います。 構成 設定概要 初期設定はip addressのみです 構成図 netファイル model = 3620 [localhost] [[3620]] image = C \Program Files\Dynamips\images\c3620-j1s3-mz.123-18.bin ram = 128 [[ROUTER R1]] f0/0 = R2 f0/0 [[ROUTER R2]] f1/0 = R3 f1/0 [[ROUTER R3]] 初期設定 R1 ! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R1 ! boot-start-marker boot-end-marker ! ! no aaa new-model ip subnet-zero ! ! ! ip cef ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.12.1 255.255.255.0 duplex auto speed auto ! ip http server ip classless ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end 初期設定 R2 ! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R2 ! boot-start-marker boot-end-marker ! ! no aaa new-model ip subnet-zero ! ! ! ip cef ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.12.2 255.255.255.0 duplex auto speed auto ! interface FastEthernet1/0 ip address 192.168.23.2 255.255.255.0 duplex auto speed auto ! ip http server ip classless ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end 初期設定 R3 ! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R3 ! boot-start-marker boot-end-marker ! ! no aaa new-model ip subnet-zero ! ! ! ip cef ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 3.3.3.3 255.255.255.255 ! interface FastEthernet1/0 ip address 192.168.23.3 255.255.255.0 duplex auto speed auto ! ip http server ip classless ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end 検証1 検証環境構築 BGPの設定 BGP neighborの設定を投入します。R1, R2間はiBGP neighborとし、R2, R3間はeBGP neighborとします。 R1(config)#router bgp 1 R1(config-router)#neighbor 192.168.12.2 remote-as 1 R1(config-router)#network 1.1.1.1 mask 255.255.255.255 R2(config)#router bgp 1 R2(config-router)#neighbor 192.168.12.1 remote-as 1 R2(config-router)#neighbor 192.168.12.1 next-hop-self R2(config-router)#neighbor 192.168.23.3 remote-as 3 R2(config-router)#network 2.2.2.2 mask 255.255.255.255 R3(config)#router bgp 3 R3(config-router)#neighbor 192.168.23.2 remote-as 1 R3(config-router)#network 3.3.3.3 mask 255.255.255.255 BGP neighborの確認 BGP neighborが確立された事を確認します。 R2#show ip bgp summary BGP router identifier 2.2.2.2, local AS number 1 BGP table version is 4, main routing table version 4 3 network entries using 303 bytes of memory 3 path entries using 144 bytes of memory 3 BGP path attribute entries using 180 bytes of memory 1 BGP AS-PATH entries using 24 bytes of memory 0 BGP route-map cache entries using 0 bytes of memory 0 BGP filter-list cache entries using 0 bytes of memory BGP using 651 total bytes of memory BGP activity 3/0 prefixes, 3/0 paths, scan interval 60 secs Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 192.168.12.1 4 1 6 7 4 0 0 00 02 00 1 192.168.23.3 4 3 6 7 4 0 0 00 01 01 1 R2# 検証2 timers bgpによる設定 デフォルト設定の確認 デフォルトの状態でのBGP hello time, hold timeを確認します。iBGP neighborもeBGP neighborも同様に、helloが60秒, holdが180秒になっています。 R2#show ip bgp neighbors 192.168.12.1 BGP neighbor is 192.168.12.1, remote AS 1, internal link BGP version 4, remote router ID 1.1.1.1 BGP state = Established, up for 00 03 16 Last read 00 00 16, hold time is 180, keepalive interval is 60 seconds - hello, holdを確認 Neighbor capabilities Route refresh advertised and received(old new) Address family IPv4 Unicast advertised and received - 略 - R2#show ip bgp neighbors 192.168.23.3 BGP neighbor is 192.168.23.3, remote AS 3, external link BGP version 4, remote router ID 3.3.3.3 BGP state = Established, up for 00 02 49 Last read 00 00 49, hold time is 180, keepalive interval is 60 seconds - hello, holdを確認 Neighbor capabilities Route refresh advertised and received(old new) Address family IPv4 Unicast advertised and received timer bgpによる設定 timer bgpコマンドでhello, holdを調整します。しかし、このコマンドを投入しただけでは、設定が反映されない事が確認できます。 R1(config)#router bgp 1 R1(config-router)#timers bgp 45 135 R2(config)#router bgp 1 R2(config-router)#timers bgp 50 150 R2#show ip bgp neighbors 192.168.12.1 BGP neighbor is 192.168.12.1, remote AS 1, internal link BGP version 4, remote router ID 1.1.1.1 BGP state = Established, up for 00 09 15 Last read 00 00 14, hold time is 180, keepalive interval is 60 seconds - 設定投入だけでは反映されません Configured hold time is 150, keepalive interval is 50 seconds Neighbor capabilities Route refresh advertised and received(old new) Address family IPv4 Unicast advertised and received neighborの再確立 R1, R2間のneihgborを再確立させます。neighbor確立時にhello, holdの値がネゴシエーションされ、hello, holdの値が反映されます。なお、hello, holdがneihgbor間で異なる場合は、小さい方の値が採用されます。 R1#clear ip bgp 192.168.12.2 R1# *Mar 1 00 18 38.871 %BGP-5-ADJCHANGE neighbor 192.168.12.2 Down User reset *Mar 1 00 18 45.959 %BGP-5-ADJCHANGE neighbor 192.168.12.2 Up R1# R1#show ip bgp neighbors 192.168.12.2 BGP neighbor is 192.168.12.2, remote AS 1, internal link BGP version 4, remote router ID 2.2.2.2 BGP state = Established, up for 00 00 27 Last read 00 00 27, hold time is 135, keepalive interval is 45 seconds - hello, holdの値が反映された事が分かります Configured hold time is 135, keepalive interval is 45 seconds Neighbor capabilities Route refresh advertised and received(old new) Address family IPv4 Unicast advertised and received パケットキャプチャによる確認 neighbor確立時のパケットを採取すると、確かに、hello, holdの値をネゴシエーションしている様子が読み取れます。 検証3 neighbor timersによる設定 neighbor timersによる設定 neighbor timersコマンドを用いると、neihgbor毎にhello, holdを設定する事ができます。なお、この設定は検証2のbgp timersよりも優先されます。 R2(config)#router bgp 1 R2(config-router)#neighbor 192.168.23.3 timers 30 90 R3(config)#router bgp 3 R3(config-router)#neighbor 192.168.23.2 timers 40 120 R2#clear ip bgp 192.168.23.3 R2# *Mar 1 00 23 41.039 %BGP-5-ADJCHANGE neighbor 192.168.23.3 Down User reset *Mar 1 00 23 57.731 %BGP-5-ADJCHANGE neighbor 192.168.23.3 Up R2# R2#show ip bgp neighbors 192.168.23.3 BGP neighbor is 192.168.23.3, remote AS 3, external link BGP version 4, remote router ID 3.3.3.3 BGP state = Established, up for 00 00 06 Last read 00 00 06, hold time is 90, keepalive interval is 30 seconds Configured hold time is 90, keepalive interval is 30 seconds Neighbor capabilities Route refresh advertised and received(old new) Address family IPv4 Unicast advertised and received 検証4 最小送信間隔の確認 デフォルト設定の確認 BGPでは、フラッピングの影響を緩和するために、最小送信間隔を定義しています。最小送信間隔はshow ip bgp neighborコマンドで確認可能であり、デフォルト設定の場合のiBGPは5秒、eBGPは30秒になっています。具体的には、iBGP neighborでは、BGP updateを送信した後は、少なくても5秒間はBGP updateを送信しなくなるという意味です。 R2#show ip bgp neighbors 192.168.12.1 BGP neighbor is 192.168.12.1, remote AS 1, internal link BGP version 4, remote router ID 192.168.12.1 BGP state = Established, up for 00 07 41 Last read 00 00 16, hold time is 135, keepalive interval is 45 seconds Configured hold time is 150, keepalive interval is 50 seconds Neighbor capabilities Route refresh advertised and received(old new) Address family IPv4 Unicast advertised and received Message statistics InQ depth is 0 OutQ depth is 0 Sent Rcvd Opens 1 1 Notifications 0 0 Updates 2 3 Keepalives 13 13 Route Refresh 0 0 Total 16 17 Default minimum time between advertisement runs is 5 seconds - 最小送信間隔は5秒 For address family IPv4 Unicast BGP table version 6, neighbor version 6 Index 1, Offset 0, Mask 0x2 R2# R2# R2#show ip bgp neighbors 192.168.23.3 BGP neighbor is 192.168.23.3, remote AS 3, external link BGP version 4, remote router ID 3.3.3.3 BGP state = Established, up for 00 07 34 Last read 00 00 04, hold time is 90, keepalive interval is 30 seconds - 最小送信間隔は30秒 Configured hold time is 90, keepalive interval is 30 seconds Neighbor capabilities Route refresh advertised and received(old new) Address family IPv4 Unicast advertised and received Message statistics InQ depth is 0 OutQ depth is 0 Sent Rcvd Opens 1 1 Notifications 0 0 Updates 4 1 Keepalives 18 18 Route Refresh 0 0 Total 23 20 Default minimum time between advertisement runs is 30 seconds For address family IPv4 Unicast BGP table version 6, neighbor version 6 Index 2, Offset 0, Mask 0x4 R2# デバッグの有効化 R1, R2でdebug ip bgp updatesを有効にします。 R1#debug ip bgp updates BGP updates debugging is on R1# R2#debug ip bgp updates BGP updates debugging is on R2# BGP updatesの確認 R1 Lo0で素早くshut, no shutコマンドを投入します。すると、1.1.1.1への経路がなくなった旨のupdateは00 11 15に送信されているのに対し、1.1.1.1への経路が復活した旨のupdateは5秒後の00 11 20に送信されています。 R1(config)#interface Loopback 0 R1(config-if)#shutdown R1(config-if)#no shut R1(config-if)# *Mar 1 00 11 15.455 BGP(0) route 1.1.1.1/32 down *Mar 1 00 11 15.455 BGP(0) no valid path for 1.1.1.1/32 *Mar 1 00 11 15.459 BGP(0) nettable_walker 1.1.1.1/32 no best path *Mar 1 00 11 15.463 BGP(0) 192.168.12.2 computing updates, afi 0, neighbor version 8, table version 9, starting at 0.0.0.0 *Mar 1 00 11 15.463 BGP(0) 192.168.12.2 send unreachable 1.1.1.1/32 *Mar 1 00 11 15.467 BGP(0) 192.168.12.2 send UPDATE 1.1.1.1/32 -- unreachable *Mar 1 00 11 15.467 BGP(0) 192.168.12.2 1 updates enqueued (average=28, maximum=28) *Mar 1 00 11 15.471 BGP(0) 192.168.12.2 update run completed, afi 0, ran for 8ms, neighbor version 8, start version 9, throttled to 9 *Mar 1 00 11 16.331 BGP(0) route 1.1.1.1/32 up *Mar 1 00 11 16.335 BGP(0) nettable_walker 1.1.1.1/32 route sourced locally *Mar 1 00 11 20.775 BGP(0) 192.168.12.2 computing updates, afi 0, neighbor version 9, table version 10, starting at 0.0.0.0 *Mar 1 00 11 20.779 BGP(0) 192.168.12.2 send UPDATE (format) 1.1.1.1/32, next 192.168.12.1, metric 0, path *Mar 1 00 11 20.783 BGP(0) 192.168.12.2 1 updates enqueued (average=56, maximum=56) *Mar 1 00 11 20.783 BGP(0) 192.168.12.2 update run completed, afi 0, ran for 8ms, neighbor version 9, start version 10, throttled to 10 R1(config-if)# また、R2のデバッグメッセージを確認すると、最小送信間隔が30秒である事が読み取れます。1.1.1.1への経路がなくなった旨のupdateは00 03 45に送信されているのに対し、1.1.1.1への経路が復活した旨のupdateは30秒後の00 04 15に送信されています。 R2# *Mar 1 00 03 45.855 BGP(0) 192.168.12.1 rcv UPDATE about 1.1.1.1/32 -- withdrawn *Mar 1 00 03 45.859 BGP(0) no valid path for 1.1.1.1/32 *Mar 1 00 03 45.863 BGP(0) nettable_walker 1.1.1.1/32 no best path *Mar 1 00 03 45.863 BGP(0) 192.168.12.1 computing updates, afi 0, neighbor version 4, table version 5, starting at 0.0.0.0 *Mar 1 00 03 45.867 BGP(0) 192.168.12.1 update run completed, afi 0, ran for 0ms, neighbor version 4, start version 5, throttled to 5 *Mar 1 00 03 45.971 BGP(0) 192.168.23.3 computing updates, afi 0, neighbor version 4, table version 5, starting at 0.0.0.0 *Mar 1 00 03 45.975 BGP(0) 192.168.23.3 send unreachable 1.1.1.1/32 *Mar 1 00 03 45.975 BGP(0) 192.168.23.3 send UPDATE 1.1.1.1/32 -- unreachable *Mar 1 00 03 45.975 BGP(0) 192.168.23.3 1 updates enqueued (average=28, maximum=28) *Mar 1 00 03 45.979 BGP(0) 192.168.23.3 update run completed, afi 0, ran for 8ms, neighbor version 4, start version 5, throttled to 5 *Mar 1 00 03 54.955 BGP(0) 192.168.12.1 rcvd UPDATE w/ attr nexthop 192.168.12.1, origin i, localpref 100, metric 0 *Mar 1 00 03 54.959 BGP(0) 192.168.12.1 rcvd 1.1.1.1/32 *Mar 1 00 03 54.959 BGP(0) Revise route installing 1 of 1 route for 1.1.1.1/32 - 192.168.12.1 to main IP table *Mar 1 00 03 55.063 BGP(0) 192.168.12.1 computing updates, afi 0, neighbor version 5, table version 6, starting at 0.0.0.0 *Mar 1 00 03 55.067 BGP(0) 192.168.12.1 update run completed, afi 0, ran for 4ms, neighbor version 5, start version 6, throttled to 6 *Mar 1 00 04 15.115 BGP(0) 192.168.23.3 computing updates, afi 0, neighbor version 5, table version 6, starting at 0.0.0.0 *Mar 1 00 04 15.119 BGP(0) 192.168.23.3 send UPDATE (format) 1.1.1.1/32, next 192.168.23.2, metric 0, path *Mar 1 00 04 15.123 BGP(0) 192.168.23.3 1 updates enqueued (average=46, maximum=46) *Mar 1 00 04 15.123 BGP(0) 192.168.23.3 update run completed, afi 0, ran for 8ms, neighbor version 5, start version 6, throttled to 6 R2# 検証5 最小送信間隔の設定 デバッグの有効化 検証4に引き続き、R1, R2でのdebug ip bgp updatesは有効なままにしておきます。 R1#debug ip bgp updates BGP updates debugging is on R1# R2#debug ip bgp updates BGP updates debugging is on R2# 最小送信間隔の設定 neihgbor advertisement-intervalコマンドを用いて、最小送信間隔を設定します。 R1(config)#router bgp 1 R1(config-router)#neighbor 192.168.12.2 advertisement-interval 15 R1(config-router)#^Z R1# *Mar 1 00 05 07.027 %SYS-5-CONFIG_I Configured from console by console R1# R1# R1#show ip bgp neighbors 192.168.12.2 BGP neighbor is 192.168.12.2, remote AS 1, internal link BGP version 4, remote router ID 2.2.2.2 BGP state = Established, up for 00 00 20 Last read 00 00 20, hold time is 135, keepalive interval is 45 seconds Configured hold time is 135, keepalive interval is 45 seconds Neighbor capabilities Route refresh advertised and received(old new) Address family IPv4 Unicast advertised and received Message statistics InQ depth is 0 OutQ depth is 0 Sent Rcvd Opens 2 2 Notifications 0 0 Updates 2 4 Keepalives 13 13 Route Refresh 0 0 Total 17 19 Default minimum time between advertisement runs is 5 seconds - デフォルトの最小送信間隔 For address family IPv4 Unicast BGP table version 8, neighbor version 8 Index 1, Offset 0, Mask 0x2 Sent Rcvd Prefix activity ---- ---- Prefixes Current 1 2 (Consumes 96 bytes) Prefixes Total 1 2 Implicit Withdraw 0 0 Explicit Withdraw 0 0 Used as bestpath n/a 2 Used as multipath n/a 0 Outbound Inbound Local Policy Denied Prefixes -------- ------- Bestpath from this peer 2 n/a Total 2 0 Number of NLRIs in the update sent max 1, min 0 Minimum time between advertisement runs is 15 seconds - 現在設定されている最小送信間隔 R2(config)#router bgp 1 R2(config-router)#neighbor 192.168.23.3 advertisement-interval 40 R2(config-router)#^Z R2# *Mar 1 00 05 12.747 %SYS-5-CONFIG_I Configured from console by console R2# R2# R2#show ip bgp neighbors 192.168.23.3 BGP neighbor is 192.168.23.3, remote AS 3, external link BGP version 4, remote router ID 3.3.3.3 BGP state = Established, up for 00 07 28 Last read 00 00 27, hold time is 90, keepalive interval is 30 seconds Configured hold time is 90, keepalive interval is 30 seconds Neighbor capabilities Route refresh advertised and received(old new) Address family IPv4 Unicast advertised and received Message statistics InQ depth is 0 OutQ depth is 0 Sent Rcvd Opens 1 1 Notifications 0 0 Updates 4 1 Keepalives 17 17 Route Refresh 0 0 Total 22 19 Default minimum time between advertisement runs is 30 seconds - デフォルトの最小送信間隔 For address family IPv4 Unicast BGP table version 6, neighbor version 6 Index 2, Offset 0, Mask 0x4 Sent Rcvd Prefix activity ---- ---- Prefixes Current 2 1 (Consumes 48 bytes) Prefixes Total 3 1 Implicit Withdraw 0 0 Explicit Withdraw 1 0 Used as bestpath n/a 1 Used as multipath n/a 0 Outbound Inbound Local Policy Denied Prefixes -------- ------- Bestpath from this peer 1 n/a Total 1 0 Number of NLRIs in the update sent max 1, min 0 Minimum time between advertisement runs is 40 seconds - 現在設定されている最小送信間隔 BGP updatesの確認 R1 Lo0で素早くshut, no shutコマンドを投入します。検証4の時に比べて、最小送信間隔が長くなっている事が分かります。 R1(config)#interface Loopback 0 R1(config-if)#shutdown R1(config-if)#no shutdown R1(config-if)# R1(config-if)# *Mar 1 00 12 30.011 BGP(0) route 1.1.1.1/32 down *Mar 1 00 12 30.011 BGP(0) no valid path for 1.1.1.1/32 *Mar 1 00 12 30.015 BGP(0) nettable_walker 1.1.1.1/32 no best path *Mar 1 00 12 30.019 BGP(0) 192.168.12.2 computing updates, afi 0, neighbor version 8, table version 9, starting at 0.0.0.0 *Mar 1 00 12 30.019 BGP(0) 192.168.12.2 send unreachable 1.1.1.1/32 *Mar 1 00 12 30.023 BGP(0) 192.168.12.2 send UPDATE 1.1.1.1/32 -- unreachable *Mar 1 00 12 30.023 BGP(0) 192.168.12.2 1 updates enqueued (average=28, maximum=28) *Mar 1 00 12 30.027 BGP(0) 192.168.12.2 update run completed, afi 0, ran for 8ms, neighbor version 8, start version 9, throttled to 9 *Mar 1 00 12 30.231 BGP(0) route 1.1.1.1/32 up *Mar 1 00 12 30.235 BGP(0) nettable_walker 1.1.1.1/32 route sourced locally *Mar 1 00 12 42.611 BGP(0) 192.168.12.2 computing updates, afi 0, neighbor version 9, table version 10, starting at 0.0.0.0 *Mar 1 00 12 42.615 BGP(0) 192.168.12.2 send UPDATE (format) 1.1.1.1/32, next 192.168.12.1, metric 0, path *Mar 1 00 12 42.619 BGP(0) 192.168.12.2 1 updates enqueued (average=56, maximum=56) *Mar 1 00 12 42.619 BGP(0) 192.168.12.2 update run completed, afi 0, ran for 8ms, neighbor version 9, start version 10, throttled to 10 *Mar 1 00 13 00.507 BGP(0) route 1.1.1.1/32 up R1(config-if)# R2# *Mar 1 00 12 13.563 BGP(0) 192.168.12.1 rcv UPDATE about 1.1.1.1/32 -- withdrawn *Mar 1 00 12 13.563 BGP(0) no valid path for 1.1.1.1/32 *Mar 1 00 12 13.567 BGP(0) nettable_walker 1.1.1.1/32 no best path *Mar 1 00 12 13.571 BGP(0) 192.168.12.1 computing updates, afi 0, neighbor version 6, table version 7, starting at 0.0.0.0 *Mar 1 00 12 13.575 BGP(0) 192.168.12.1 update run completed, afi 0, ran for 4ms, neighbor version 6, start version 7, throttled to 7 *Mar 1 00 12 13.575 BGP(0) 192.168.23.3 computing updates, afi 0, neighbor version 6, table version 7, starting at 0.0.0.0 *Mar 1 00 12 13.579 BGP(0) 192.168.23.3 send unreachable 1.1.1.1/32 *Mar 1 00 12 13.583 BGP(0) 192.168.23.3 send UPDATE 1.1.1.1/32 -- unreachable *Mar 1 00 12 13.583 BGP(0) 192.168.23.3 1 updates enqueued (average=28, maximum=28) *Mar 1 00 12 13.583 BGP(0) 192.168.23.3 update run completed, afi 0, ran for 4ms, neighbor version 6, start version 7, throttled to 7 *Mar 1 00 12 26.035 BGP(0) 192.168.12.1 rcvd UPDATE w/ attr nexthop 192.168.12.1, origin i, localpref 100, metric 0 *Mar 1 00 12 26.035 BGP(0) 192.168.12.1 rcvd 1.1.1.1/32 *Mar 1 00 12 26.039 BGP(0) Revise route installing 1 of 1 route for 1.1.1.1/32 - 192.168.12.1 to main IP table *Mar 1 00 12 26.143 BGP(0) 192.168.12.1 computing updates, afi 0, neighbor version 7, table version 8, starting at 0.0.0.0 *Mar 1 00 12 26.147 BGP(0) 192.168.12.1 update run completed, afi 0, ran for 4ms, neighbor version 7, start version 8, throttled to 8 *Mar 1 00 12 49.247 BGP(0) 192.168.23.3 computing updates, afi 0, neighbor version 7, table version 8, starting at 0.0.0.0 *Mar 1 00 12 49.251 BGP(0) 192.168.23.3 send UPDATE (format) 1.1.1.1/32, next 192.168.23.2, metric 0, path *Mar 1 00 12 49.255 BGP(0) 192.168.23.3 1 updates enqueued (average=46, maximum=46) *Mar 1 00 12 49.255 BGP(0) 192.168.23.3 update run completed, afi 0, ran for 8ms, neighbor version 7, start version 8, throttled to 8 R2# 検証6 bgp fast-external-fallover デバッグの有効化 R3でdebug ip bgp eventsを有効にします。 R3#debug ip bgp events BGP events debugging is on R3# デフォルトの挙動確認 bgp fast-external-fallover機能を使用すると、eBGP neighborで使用しているI/Fがダウンした場合、すぐにneighborも切断します。 まずは、fast-external-falloverが機能していないデフォルトの挙動を確認します。R3 f1/0をshutdownすると、00 33 08にshutdown したにも関わらず、NOTIFICATIONが送信されたのは00 34 20になっています。NOTIFICATIONが送信されるまでに1分以上もかかっています。 R3(config)#interface FastEthernet 1/0 R3(config-if)#shutdown R3(config-if)# *Mar 1 00 33 08.199 %LINK-5-CHANGED Interface FastEthernet1/0, changed state to administratively down *Mar 1 00 33 09.199 %LINEPROTO-5-UPDOWN Line protocol on Interface FastEthernet1/0, changed state to down *Mar 1 00 33 16.055 BGP Import timer expired. Walking from 1 to 1 *Mar 1 00 33 31.055 BGP Import timer expired. Walking from 1 to 1 *Mar 1 00 33 46.055 BGP Import timer expired. Walking from 1 to 1 *Mar 1 00 34 01.055 BGP Performing BGP general scanning *Mar 1 00 34 01.055 BGP(0) scanning IPv4 Unicast routing tables *Mar 1 00 34 01.071 BGP(IPv4 Unicast) Performing BGP Nexthop scanning for general scan *Mar 1 00 34 01.071 BGP(0) Future scanner version 35, current scanner version 34 *Mar 1 00 34 01.071 BGP(1) scanning IPv6 Unicast routing tables *Mar 1 00 34 01.071 BGP(IPv6 Unicast) Performing BGP Nexthop scanning for general scan *Mar 1 00 34 01.071 BGP(1) Future scanner version 35, current scanner version 34 *Mar 1 00 34 01.071 BGP(2) scanning VPNv4 Unicast routing tables *Mar 1 00 34 01.071 BGP(VPNv4 Unicast) Performing BGP Nexthop scanning for general scan *Mar 1 00 34 01.071 BGP(2) Future scanner version 35, current scanner version 34 *Mar 1 00 34 01.071 BGP(3) scanning IPv4 Multicast routing tables *Mar 1 00 34 01.087 BGP(IPv4 Multicast) Performing BGP Nexthop scanning for general scan *Mar 1 00 34 01.087 BGP(3) Future scanner version 35, current scanner version 34 *Mar 1 00 34 16.087 BGP Import timer expired. Walking from 1 to 1 *Mar 1 00 34 20.411 BGP 192.168.23.2 reset due to BGP Notification sent *Mar 1 00 34 20.411 %BGP-5-ADJCHANGE neighbor 192.168.23.2 Down BGP Notification sent - BGP neighbor切断 *Mar 1 00 34 20.415 %BGP-3-NOTIFICATION sent to neighbor 192.168.23.2 4/0 (hold time expired) 0 bytes - NOTIFICATIONメッセージでneighbor断を伝えています R3(config-if)#no shutdown bgp fast-external-falloverの設定 bgp fast-external-falloverを設定します。R3 f1/0をshutdownすると、すぐにneighborも切断されている事が分かります。 R3(config)#router bgp 3 R3(config-router)#bgp fast-external-fallover R3(config-router)#exit R3(config)# R3(config)# R3(config)#interface FastEthernet 1/0 R3(config-if)#shutdown R3(config-if)# *Mar 1 00 32 12.519 BGP service reset requests *Mar 1 00 32 12.519 BGP service reset requests *Mar 1 00 32 12.519 BGP service reset requests *Mar 1 00 32 12.523 BGP service reset requests *Mar 1 00 32 12.523 BGP 192.168.23.2 reset due to Interface flap *Mar 1 00 32 12.523 %BGP-5-ADJCHANGE neighbor 192.168.23.2 Down Interface flap - BGP neighbor切断 *Mar 1 00 32 14.503 %LINK-5-CHANGED Interface FastEthernet1/0, changed state to administratively down *Mar 1 00 32 15.503 %LINEPROTO-5-UPDOWN Line protocol on Interface FastEthernet1/0, changed state to down *Mar 1 00 32 15.991 BGP Import timer expired. Walking from 1 to 1 R3(config-if)#no shutdown 検証7 bgp dampening ネットワークのエミュレート R3に172.16.0.0/24のネットワークが接続されているかのような設定を投入します。 R3(config)#interface Loopback 0 R3(config-if)#ip address 172.16.0.3 255.255.255.0 secondary R3(config-if)#exit R3(config)# R3(config)# R3(config)#router bgp 3 R3(config-router)#network 172.16.0.0 mask 255.255.255.0 bgp dampeningの設定 bgp dampeningとは、フラッピングの影響を緩和するための機能です。フラップした経路に対し、penalty値を定義します。penaltyはフラップを繰り返す程大きくなり、時間の経過とともに減少します。penalty値が一定を超えた経路を敢えて使用しなくする事で、不ラッピングの影響を緩和します。 bgp dampeningの設定は以下の通りです。なお、dampeningで使用するパラメタの説明は省略します。 R2(config)#router bgp 1 R2(config-router)#bgp dampening 5 600 1500 20 history 以下の要領で、R3 Lo0をフラッピングさせます。 R3(config)#interface Loopback 0 R3(config-if)#shutdown R3(config-if)#no shutdown R2のBGPテーブルを確認すると、一部の経路がh(history)として表示されています。これはフラッピングが起きた事を表しています。 R2#show ip bgp BGP table version is 25, local router ID is 2.2.2.2 Status codes s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S Stale Origin codes i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path * i1.1.1.1/32 192.168.12.1 0 100 0 i * 2.2.2.2/32 0.0.0.0 0 32768 i h 3.3.3.3/32 192.168.23.3 0 0 3 i - フラッピングした経路 h 172.16.0.0/24 192.168.23.3 0 0 3 i - フラッピングした経路 R2# R2# R2#show ip bgp 3.3.3.3 BGP routing table entry for 3.3.3.3/32, version 19 Paths (1 available, best #1, table Default-IP-Routing-Table) Flag 0x820 Not advertised to any peer 3 192.168.23.3 from 192.168.23.3 (3.3.3.3) Origin IGP, metric 0, localpref 100, valid, external, best Dampinfo penalty 890, flapped 1 times in 00 00 57 - penalty値が確認できます。 R2# damped さらにフラッピングを繰り返すと、d(damped)と表示され、他のpeerに経路を伝えなくなります R2#show ip bgp BGP table version is 29, local router ID is 2.2.2.2 Status codes s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S Stale Origin codes i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path * i1.1.1.1/32 192.168.12.1 0 100 0 i * 2.2.2.2/32 0.0.0.0 0 32768 i *d 3.3.3.3/32 192.168.23.3 0 0 3 i *d 172.16.0.0/24 192.168.23.3 0 0 3 i R2# R2# R2#show ip bgp 3.3.3.3 BGP routing table entry for 3.3.3.3/32, version 28 Paths (1 available, no best path) Flag 0x820 Not advertised to any peer 3, (suppressed due to dampening) 192.168.23.3 from 192.168.23.3 (3.3.3.3) Origin IGP, metric 0, localpref 100, valid, external Dampinfo penalty 2078, flapped 2 times in 00 07 35, reuse in 00 09 00 - penalty値が確認できます R2# 検証8 経路毎のdampening定義 bgp dampeningの設定 以下のようにroute-mapを用いて経路毎にdampingを定義する事もできます。 R2(config)#ip prefix-list LIST_DAM seq 10 permit 172.16.0.0/24 R2(config)# R2(config)# R2(config)#route-map MAP_DAM permit 10 R2(config-route-map)#match ip address prefix-list LIST_DAM R2(config-route-map)#set dampening 5 600 1500 20 R2(config-route-map)#exit R2(config)# R2(config)# R2(config)#router bgp 1 R2(config-router)#no bgp dampening R2(config-router)#bgp dampening route-map MAP_DAM dampingの確認 以下の要領で、R3 Lo0を数回フラッピングさせます。 R3(config)#interface Loopback 0 R3(config-if)#shutdown R3(config-if)#no shutdown R2のBGPテーブルを見ると、172.16.0.0/24のみdampingの対象となっている事が分かります。 R2#show ip bgp BGP table version is 12, local router ID is 2.2.2.2 Status codes s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S Stale Origin codes i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path * i1.1.1.1/32 192.168.12.1 0 100 0 i * 2.2.2.2/32 0.0.0.0 0 32768 i * 3.3.3.3/32 192.168.23.3 0 0 3 i *d 172.16.0.0/24 192.168.23.3 0 0 3 i R2# R2# R2#show ip bgp 3.3.3.3 BGP routing table entry for 3.3.3.3/32, version 12 Paths (1 available, best #1, table Default-IP-Routing-Table) Advertised to non peer-group peers 192.168.12.1 3 192.168.23.3 from 192.168.23.3 (3.3.3.3) Origin IGP, metric 0, localpref 100, valid, external, best R2# R2# R2#show ip bgp 172.16.0.0 BGP routing table entry for 172.16.0.0/24, version 11 Paths (1 available, no best path) Not advertised to any peer 3, (suppressed due to dampening) 192.168.23.3 from 192.168.23.3 (3.3.3.3) Origin IGP, metric 0, localpref 100, valid, external Dampinfo penalty 1605, flapped 2 times in 00 02 14, reuse in 00 07 00 R2#
https://w.atwiki.jp/kakis/pages/10748.html
上位標目 第十四期新生アルカ概説 比較 再帰動詞_na9 再帰動詞(2009/02/03 (火) 08 45 21)より転記 アルカには「座らせる」はあっても「座る」という単語はない。 「私は座る」は「私は自分を座らせる」というフランス語のような表現をする。 an skin nos(私は自分を座らせる→私は座る) ただし、この手の動詞は目的語に自分が来るのが無標であるから、通常nosは省略される。 従って、通常はan skinという。はっきり再帰だと言いたいときに、nos を付ける。 再帰動詞を取るものは、姿勢動詞が多い。 寝る、座る、立つなどから、あくびをする、笑うなど、さまざまなものが再帰動詞となる。 上位標目 第十四期新生アルカ概説 比較 再帰動詞_na9
https://w.atwiki.jp/magicman/pages/17869.html
再帰的詠唱 C 光/水文明 (2) 呪文 ■このカードはマナゾーンに置く時、タップして置く。 ■自分の山札を見る。その中から《再帰的詠唱》と名のつく呪文を1枚選んで、コストを支払わずに唱えてもよい。その後、山札をシャッフルする。 最大4回唱えられる、という「だけ」の呪文。 作者:仙人掌 フレーバーテキスト 詠唱の外枠のみを凝縮した。これが何の役に立つのかは分からないが… 評価 名前 コメント
https://w.atwiki.jp/tm-mura/pages/43.html
階層構造(木構造)で深さが一定していないデータを辿ったりとか、 条件に合致するまで一定しない数をインクリメントしながら探索するロジックでは 再帰プログラムが有効。 PL/SQLでももちろんできる。 が、末尾最適化みたいなのは調べたけど全くヒットしないので、 再帰回数があまりに多い処理は考え物。 以下に、○週後の週末または月末を返すファンクションを記載 CREATE OR REPLACE FUNCTION BPI_F_GET_WEEKEND( p$DATEIN DATE, p$WEEKIN NUMBER, p$BEGIN_ENDIN VARCHAR2 ) RETURN DATE /******************************************************************************/ /* p$DATE 判定する月を入れる。日付も必要だが、月初日でなくてもよい */ /* p$WEEK 何週後かを数値で指定する */ /* p$BEGIN_END 週初め(日曜日)または週末(土曜日)を B or E で指定する */ /* 使い方 */ /* SELECT BPI_F_GET_WEEKEND( 2010/01/01 ,1, B ) */ /* ,BPI_F_GET_WEEKEND( 2010/01/01 ,1, E ) */ /* FROM DUAL; */ /******************************************************************************/ IS p$START_DATE DATE; p$RET_DATE DATE; BEGIN -- 引数の日付を月初日に変換 p$START_DATE = TRUNC(p$DATE, MM ); -- 一週目の処理 IF p$WEEK = 1 THEN IF p$BEGIN_END = B THEN RETURN p$START_DATE; ELSIF p$BEGIN_END = E THEN -- 最初の週の土曜日取得 p$RET_DATE = NEXT_DAY(p$START_DATE - 1, 土 ); RETURN p$RET_DATE; END IF; ELSE -- 二週目以降は再帰した返り値にさらに加算 p$RET_DATE = BPI_F_GET_WEEKEND(p$START_DATE, p$WEEK - 1, E ) + 1; IF p$BEGIN_END = B THEN RETURN p$RET_DATE; ELSIF p$BEGIN_END = E THEN p$START_DATE = TRUNC(p$RET_DATE, MM ); p$RET_DATE = NEXT_DAY(p$RET_DATE - 1, 土 ); RETURN LEAST(p$RET_DATE, LAST_DAY(p$START_DATE)); END IF; END IF; EXCEPTION WHEN OTHERS THEN RETURN NULL; END; /
https://w.atwiki.jp/it_certification/pages/130.html
目的 構成 検証1 方側のみ設定 検証2 パスワードが違う場合 検証3 BGP neighborの認証 目的 BGP neighborで認証を設定する方法を確認します。 構成 設定概要 初期設定はip addressのみです 構成図 netファイル model = 3620 [localhost] [[3620]] image = C \Program Files\Dynamips\images\c3620-j1s3-mz.123-18.bin ram = 128 [[ROUTER R1]] f0/0 = R2 f0/0 [[ROUTER R2]] 初期設定 R1 ! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R1 ! boot-start-marker boot-end-marker ! ! no aaa new-model ip subnet-zero ! ! ! ip cef ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.12.1 255.255.255.0 duplex auto speed auto ! ip http server ip classless ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end 初期設定 R2 ! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R2 ! boot-start-marker boot-end-marker ! ! no aaa new-model ip subnet-zero ! ! ! ip cef ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.12.2 255.255.255.0 duplex auto speed auto ! ip http server ip classless ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end 検証1 方側のみ設定 方側のみ設定 R1のみBGP neighbor認証の設定を投入します。 R1(config)#router bgp 1 R1(config-router)#neighbor 192.168.12.2 remote-as 2 R1(config-router)#network 1.1.1.1 mask 255.255.255.255 R1(config-router)#neighbor 192.168.12.2 password hoge R2(config)#router bgp 2 R2(config-router)#neighbor 192.168.12.1 remote-as 1 R2(config-router)#network 2.2.2.2 mask 255.255.255.255 エラーメッセージの確認 コンソール上に以下のようなエラーメッセージが表示されます。 R1# *Mar 1 00 04 47.783 %TCP-6-BADAUTH No MD5 digest from 192.168.12.2(179) to 192.168.12.1(13522) (RST) 検証2 パスワードが違う場合 パスワードが違う場合 R2にもBGP neighbor認証の設定を投入します。但し、敢えてR1, R2で異なるパスワードを入力します。 R2(config)#router bgp 2 R2(config-router)#neighbor 192.168.12.1 password HOGE エラーメッセージの確認 コンソール上に以下のようなエラーメッセージが表示されます。 R1# *Mar 1 00 08 03.415 %TCP-6-BADAUTH Invalid MD5 digest from 192.168.12.2(30845) to 192.168.12.1(179) 検証3 BGP neighborの認証 BGP neighborの認証 R2にR1と同じパスワードを入力します。 R2(config)#router bgp 2 R2(config-router)#neighbor 192.168.12.1 password hoge 経路の確認 BGP neighborが確立され、経路が交換された事を確認します。 R1#show ip bgp BGP table version is 3, local router ID is 1.1.1.1 Status codes s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S Stale Origin codes i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path * 1.1.1.1/32 0.0.0.0 0 32768 i * 2.2.2.2/32 192.168.12.2 0 0 2 i R1#
https://w.atwiki.jp/it_certification/pages/136.html
目的 構成 検証1 local ASの設定 検証2 AS PATHの確認 目的 BPG local-asの使い方を確認します。 以下のシナリオを想定します。 R1はAS1からAS2の変更を計画しています。 ISP10はR1のAS番号変更に応じる事ができません。 構成 設定概要 初期設定はIPアドレスのみです。 構成図 netファイル model = 3620 [localhost] [[3620]] image = C \Program Files\Dynamips\images\c3620-j1s3-mz.123-18.bin ram = 128 [[ROUTER R1]] f0/0 = ISP10 f0/0 [[ROUTER ISP10]] 初期設定 R1 ! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R1 ! boot-start-marker boot-end-marker ! ! no aaa new-model ip subnet-zero ! ! ! ip cef ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.100.1 255.255.255.0 duplex auto speed auto ! ip http server ip classless ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end 初期設定 ISP10 ! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname ISP10 ! boot-start-marker boot-end-marker ! ! no aaa new-model ip subnet-zero ! ! ! ip cef ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 10.10.10.10 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.100.10 255.255.255.0 duplex auto speed auto ! ip http server ip classless ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end 検証1 local ASの設定 local ASの設定 R1のlocal ASとISP10の間で、eBGP neighborを確立します。 R1(config)#ip route 10.10.10.10 255.255.255.255 192.168.100.10 R1(config)# R1(config)# R1(config)# R1(config)#router bgp 2 R1(config-router)#neighbor 10.10.10.10 remote-as 10 R1(config-router)#neighbor 10.10.10.10 local-as 1 R1(config-router)#neighbor 10.10.10.10 update-source Loopback 0 R1(config-router)#neighbor 10.10.10.10 ebgp-multihop R1(config-router)# R1(config-router)#network 1.1.1.1 mask 255.255.255.255 ISP10(config)#ip route 1.1.1.1 255.255.255.255 192.168.100.1 ISP10(config)# ISP10(config)# ISP10(config)# ISP10(config)#router bgp 10 ISP10(config-router)#neighbor 1.1.1.1 remote-as 1 ISP10(config-router)#neighbor 1.1.1.1 update-source Loopback 0 ISP10(config-router)#neighbor 1.1.1.1 ebgp-multihop ISP10(config-router)# ISP10(config-router)#network 10.10.10.10 mask 255.255.255.255 BGP neighborの確認 R1, ISP10間でBGP neighborが確立された事を確認します。 R1#show ip bgp summary BGP router identifier 1.1.1.1, local AS number 2 BGP table version is 4, main routing table version 4 2 network entries using 202 bytes of memory 2 path entries using 96 bytes of memory 2 BGP path attribute entries using 120 bytes of memory 1 BGP AS-PATH entries using 24 bytes of memory 0 BGP route-map cache entries using 0 bytes of memory 0 BGP filter-list cache entries using 0 bytes of memory BGP using 442 total bytes of memory BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.10.10.10 4 10 6 6 4 0 0 00 01 07 1 R1# 検証2 AS PATHの確認 AS PATHの確認 AS PATHを確認します。local ASを使用した場合は、local ASであるAS1を経由したかのように、AS PATHが定義されます。 R1#show ip bgp BGP table version is 4, local router ID is 1.1.1.1 Status codes s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S Stale Origin codes i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path * 1.1.1.1/32 0.0.0.0 0 32768 i r 10.10.10.10/32 10.10.10.10 0 0 1 10 i R1# ISP10#show ip bgp BGP table version is 4, local router ID is 10.10.10.10 Status codes s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S Stale Origin codes i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path r 1.1.1.1/32 1.1.1.1 0 0 1 2 i * 10.10.10.10/32 0.0.0.0 0 32768 i ISP10# 論理図 local ASを使用した場合は、下記論理図のようにAS PATHが取り扱われます。
https://w.atwiki.jp/it_certification/pages/131.html
目的 構成 検証1 環境構築 検証2 maximum-prefixによる警告 検証3 maximum-prefixによるneighbor断 検証4 warning-onlyオプション 目的 BGPにおけるエントリ数を制限する方法を確認します。 設定ミス等でエントリ数増大によるメモリ枯渇を防止する方法を確認します。 構成 設定概要 初期設定はip addressのみです 構成図 netファイル model = 3620 [localhost] [[3620]] image = C \Program Files\Dynamips\images\c3620-j1s3-mz.123-18.bin ram = 128 [[ROUTER R1]] f0/0 = R2 f0/0 [[ROUTER R2]] 初期設定 R1 ! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R1 ! boot-start-marker boot-end-marker ! ! no aaa new-model ip subnet-zero ! ! ! ip cef ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.12.1 255.255.255.0 duplex auto speed auto ! ip http server ip classless ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end 初期設定 R2 ! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R2 ! boot-start-marker boot-end-marker ! ! no aaa new-model ip subnet-zero ! ! ! ip cef ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.12.2 255.255.255.0 duplex auto speed auto ! ip http server ip classless ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end 検証1 環境構築 BGP neighborの設定 R1(config)#router bgp 1 R1(config-router)#neighbor 192.168.12.2 remote-as 2 R2(config)#router bgp 2 R2(config-router)#neighbor 192.168.12.1 remote-as 1 BGP neighborの確認 BGP neighborが確立された事を確認します。 R1#show ip bgp summary - State/PfxRcdに数値が記入されている場合は、neighborが確立されたと判断できます。 BGP router identifier 1.1.1.1, local AS number 1 BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 192.168.12.2 4 2 4 4 1 0 0 00 00 31 0 R1# 検証2 maximum-prefixによる警告 maximum-prefix ルータが受信できるBGPのプレフィックス数を制限します。 R2(config)#router bgp 2 R2(config-router)#neighbor 192.168.12.1 maximum-prefix 4 ルートの生成 R1でルートを生成し、そのルートをR2に通知します。 R1(config)#interface Loopback 0 R1(config-if)#ip address 172.16.0.1 255.255.255.0 secondary R1(config-if)#ip address 172.16.1.1 255.255.255.0 secondary R1(config-if)#ip address 172.16.2.1 255.255.255.0 secondary R1(config-if)#ip address 172.16.3.1 255.255.255.0 secondary R1(config-if)#exit R1(config)# R1(config)# R1(config)#router bgp 1 R1(config-router)#network 172.168.0.0 mask 255.255.255.0 R1(config-router)#network 172.168.1.0 mask 255.255.255.0 R1(config-router)#network 172.168.2.0 mask 255.255.255.0 R1(config-router)#network 172.168.3.0 mask 255.255.255.0 警告メッセージの確認 maximum-prefixはデフォルトで、制限数の75%を超えると警告のメッセージを発生させます。現在のR2は最大4つまでのプレフィックスを扱えますので、警告メッセージはプレフィックスが3つを超えた場合に発生します。 R2# *Mar 1 00 11 09.423 %BGP-4-MAXPFX No. of prefix received from 192.168.12.1 (afi 0) reaches 4, max 4 検証3 maximum-prefixによるneighbor断 ルートの生成 R1でルートを生成し、そのルートをR2に通知します。 R1(config)#interface Loopback 0 R1(config-if)#ip address 172.16.4.1 255.255.255.0 secondary R1(config-if)#exit R1(config)# R1(config)# R1(config)#router bgp 1 R1(config-router)#network 172.168.4.0 mask 255.255.255.0 エラーメッセージの確認 プレフィックスが制限数を超過した場合は、NOTIFICATIONというメッセージを送信しneighborを意図的に切断します。 R2# *Mar 1 00 14 31.255 %BGP-5-ADJCHANGE neighbor 192.168.12.1 Down BGP Notification sent *Mar 1 00 14 31.255 %BGP-3-NOTIFICATION sent to neighbor 192.168.12.1 3/1 (update malformed) 0 bytes FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF 0034 0200 0000 1940 0101 0040 0204 0201 0001 4003 04C0 A80C 0180 0404 0000 0000 18AC 1004 パケットキャプチャによる確認 172.168.4.0/24のプレフィックスを送信したupdateメッセージの直後に、notificationメッセージでneighborを切断している様子が読み取れます。 neighborの状態確認 プレフィックス数超過によるneighbor断が生じた場合のneihgborの状態を確認します。R2はIdle (PfxCt)という特殊な表記になっている事が確認できます。 R2#show ip bgp summary BGP router identifier 2.2.2.2, local AS number 2 BGP table version is 9, main routing table version 9 5 network entries using 505 bytes of memory 0 path entries using 0 bytes of memory 0 BGP path attribute entries using 60 bytes of memory 1 BGP AS-PATH entries using 24 bytes of memory 0 BGP route-map cache entries using 0 bytes of memory 0 BGP filter-list cache entries using 0 bytes of memory BGP using 589 total bytes of memory BGP activity 5/0 prefixes, 5/5 paths, scan interval 60 secs Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 192.168.12.1 4 1 20 17 0 0 0 00 00 41 Idle (PfxCt) R2# R1#show ip bgp summary BGP router identifier 1.1.1.1, local AS number 1 BGP table version is 6, main routing table version 6 5 network entries using 505 bytes of memory 5 path entries using 240 bytes of memory 1 BGP path attribute entries using 60 bytes of memory 0 BGP route-map cache entries using 0 bytes of memory 0 BGP filter-list cache entries using 0 bytes of memory BGP using 805 total bytes of memory BGP activity 5/0 prefixes, 5/0 paths, scan interval 60 secs Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 192.168.12.2 4 2 17 20 0 0 0 00 01 34 Active R1# 検証4 warning-onlyオプション warning-onlyオプション warning-onlyを付加すると、プレフィックス数超過の状態になってもneighbor断せずに警告メッセージを生成するようになります。 R2(config)#router bgp 2 R2(config-router)#neighbor 192.168.12.1 maximum-prefix 4 warning-only R2(config-router)#^Z R2# *Mar 1 00 34 28.683 %SYS-5-CONFIG_I Configured from console by console R2#clear ip bgp * R2# R2# *Mar 1 00 36 31.955 %BGP-5-ADJCHANGE neighbor 192.168.12.1 Up *Mar 1 00 36 32.107 %BGP-4-MAXPFX No. of prefix received from 192.168.12.1 (afi 0) reaches 4, max 4 *Mar 1 00 36 32.111 %BGP-3-MAXPFXEXCEED No. of prefix received from 192.168.12.1 (afi 0) 5 exceed limit 4 R2#
https://w.atwiki.jp/it_certification/pages/132.html
目的 構成 検証1 IGPの設定 検証2 next-hopへの負荷分散 検証3 maximum-pathsによる負荷分散 検証4 負荷分散されない場合 目的 BGPにおける、以下2通りの負荷分散方法を確認します。 方法1 next-hopへの経路をIGPにより負荷分散させます 方法2 BPGに対しmaximum-pathsを設定します 構成 設定概要 初期設定はip addressのみです 構成図 netファイル model = 3620 [localhost] [[3620]] image = C \Program Files\Dynamips\images\c3620-j1s3-mz.123-18.bin ram = 128 [[ROUTER R1]] e0/0 = R2 e0/0 e0/1 = R2 e0/1 e0/2 = R3 e0/2 [[ROUTER R2]] e0/3 = LAN 1 [[ROUTER R3]] e0/3 = LAN 1 初期設定 R1 ! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R1 ! boot-start-marker boot-end-marker ! ! no aaa new-model ip subnet-zero ! ! ! ip cef ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface Ethernet0/0 ip address 192.168.12.1 255.255.255.128 half-duplex ! interface Ethernet0/1 ip address 192.168.12.129 255.255.255.128 half-duplex ! interface Ethernet0/2 ip address 192.168.13.1 255.255.255.0 half-duplex ! interface Ethernet0/3 no ip address shutdown half-duplex ! ip http server ip classless ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end 初期設定 R2 ! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R2 ! boot-start-marker boot-end-marker ! ! no aaa new-model ip subnet-zero ! ! ! ip cef ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface Ethernet0/0 ip address 192.168.12.2 255.255.255.128 half-duplex ! interface Ethernet0/1 ip address 192.168.12.130 255.255.255.128 half-duplex ! interface Ethernet0/2 no ip address shutdown half-duplex ! interface Ethernet0/3 ip address 192.168.100.2 255.255.255.0 half-duplex ! ip http server ip classless ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end 初期設定 R3 ! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R3 ! boot-start-marker boot-end-marker ! ! no aaa new-model ip subnet-zero ! ! ! ip cef ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 ip address 3.3.3.3 255.255.255.255 ! interface Ethernet0/0 no ip address shutdown half-duplex ! interface Ethernet0/1 no ip address shutdown half-duplex ! interface Ethernet0/2 ip address 192.168.13.3 255.255.255.0 half-duplex ! interface Ethernet0/3 ip address 192.168.100.3 255.255.255.0 half-duplex ! ip http server ip classless ! ! ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end 検証1 IGPの設定 IGPの設定 next-hopへの負荷分散を確認するため、IGPでR1, R2間の経路を負荷分散させます。 以下のようにOSPFで負荷分散するように設定を投入します(ついでにR3へのルーティングも設定しておきます)。 R1(config)#router ospf 1 R1(config-router)#network 192.168.12.1 0.0.0.0 area 0 R1(config-router)#network 192.168.12.129 0.0.0.0 area 0 R1(config-router)#network 192.168.13.1 0.0.0.0 area 0 R1(config-router)#network 1.1.1.1 0.0.0.0 area 0 R2(config)#router ospf 1 R2(config-router)#network 192.168.12.2 0.0.0.0 area 0 R2(config-router)#network 192.168.12.130 0.0.0.0 area 0 R2(config-router)#network 2.2.2.2 0.0.0.0 area 0 R3(config)#router ospf 1 R3(config-router)#network 192.168.13.3 0.0.0.0 area 0 R3(config-router)#network 3.3.3.3 0.0.0.0 area 0 IGPの確認 R1, R2間で負荷分散されている事を確認します。 R1#show ip route ospf 2.0.0.0/32 is subnetted, 1 subnets O 2.2.2.2 [110/11] via 192.168.12.130, 00 00 08, Ethernet0/1 - 2通りの経路がある事を確認します [110/11] via 192.168.12.2, 00 00 08, Ethernet0/0 - 2通りの経路がある事を確認します 3.0.0.0/32 is subnetted, 1 subnets O 3.3.3.3 [110/11] via 192.168.13.3, 00 00 08, Ethernet0/2 R1# R2#show ip route ospf 1.0.0.0/32 is subnetted, 1 subnets O 1.1.1.1 [110/11] via 192.168.12.1, 00 00 46, Ethernet0/0 - 2通りの経路がある事を確認します [110/11] via 192.168.12.129, 00 00 46, Ethernet0/1 - 2通りの経路がある事を確認します O 192.168.13.0/24 [110/20] via 192.168.12.1, 00 00 46, Ethernet0/0 [110/20] via 192.168.12.129, 00 00 46, Ethernet0/1 3.0.0.0/32 is subnetted, 1 subnets O 3.3.3.3 [110/21] via 192.168.12.129, 00 00 46, Ethernet0/1 [110/21] via 192.168.12.1, 00 00 46, Ethernet0/0 R2# 検証2 next-hopへの負荷分散 BGPの設定 R1, R2間でeBGP neighborの設定を行います。 R1(config)#router bgp 1 R1(config-router)#neighbor 2.2.2.2 remote-as 2 R1(config-router)#neighbor 2.2.2.2 update-source Loopback 0 R1(config-router)#neighbor 2.2.2.2 ebgp-multihop R2(config)#router bgp 2 R2(config-router)#neighbor 1.1.1.1 remote-as 1 R2(config-router)#neighbor 1.1.1.1 update-source Loopback 0 R2(config-router)#neighbor 1.1.1.1 ebgp-multihop R2(config-router)#network 192.168.100.0 mask 0 BGPの確認 BGPにより経路が交換された事を確認します。 R1#show ip bgp BGP table version is 2, local router ID is 1.1.1.1 Status codes s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S Stale Origin codes i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path * 192.168.100.0 2.2.2.2 0 0 2 i R1# 負荷分散の確認 R1からnext-hopが2.2.2.2である192.168.100.3(R3 e0/3)に対し、tracerouteを実行します。2.2.2.2までの経路はIGPによるルーティングテーブルを参照するため、以下のように負荷分散されます。 R1#traceroute Protocol [ip] Target IP address 192.168.100.3 Source address 1.1.1.1 Numeric display [n] Timeout in seconds [3] Probe count [3] Minimum Time to Live [1] Maximum Time to Live [30] Port Number [33434] Loose, Strict, Record, Timestamp, Verbose[none] Type escape sequence to abort. Tracing the route to 192.168.100.3 1 192.168.12.2 8 msec - R2 e0/0を経由しています 192.168.12.130 36 msec - R2 e0/1を経由しています 192.168.12.2 36 msec - R2 e0/0を経由しています 2 192.168.100.3 [AS 2] 60 msec 84 msec * R1# 検証3 maximum-pathsによる負荷分散 shutdown 検証を簡略化するためmaximun-pathsを検証するのに不要な経路をshutdownします。R1 e0/1に対し、shutdownコマンドを発行します。 R1(config)#interface Ethernet 0/1 R1(config-if)#shutdown R1(config-if)# *Mar 1 00 13 56.603 %OSPF-5-ADJCHG Process 1, Nbr 2.2.2.2 on Ethernet0/1 from FULL to DOWN, Neighbor Down Interface down or detached *Mar 1 00 13 58.595 %LINK-5-CHANGED Interface Ethernet0/1, changed state to administratively down *Mar 1 00 13 59.595 %LINEPROTO-5-UPDOWN Line protocol on Interface Ethernet0/1, changed state to down R1(config-if)# BGP neighborの設定 R1, R3間でBGP neighborを確立させます。 R1(config)#router bgp 1 R1(config-router)#neighbor 3.3.3.3 remote-as 2 R1(config-router)#neighbor 3.3.3.3 update-source Loopback 0 R1(config-router)#neighbor 3.3.3.3 ebgp-multihop R3(config)#router bgp 2 R3(config-router)#neighbor 1.1.1.1 remote-as 1 R3(config-router)#neighbor 1.1.1.1 update-source Loopback 0 R3(config-router)#neighbor 1.1.1.1 ebgp-multihop R3(config-router)#network 192.168.100.0 mask 255.255.255.0 R1#show ip bgp summary BGP router identifier 1.1.1.1, local AS number 1 BGP table version is 2, main routing table version 2 1 network entries using 101 bytes of memory 2 path entries using 96 bytes of memory 1 BGP path attribute entries using 60 bytes of memory 1 BGP AS-PATH entries using 24 bytes of memory 0 BGP route-map cache entries using 0 bytes of memory 0 BGP filter-list cache entries using 0 bytes of memory BGP using 281 total bytes of memory BGP activity 2/1 prefixes, 4/2 paths, scan interval 60 secs Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 2.2.2.2 4 2 22 14 2 0 0 00 01 09 1 3.3.3.3 4 2 5 5 2 0 0 00 00 02 1 R1# 負荷分散の設定 負荷分散するようR1のBGPに対し、maximum-pathsの設定を投入します。 R1(config)#router bgp 1 R1(config-router)#maximum-paths 2 ルーティングテーブルの確認 R1から192.168.100.0/24への経路に着目します。BGPテーブルを見るとベストパスが存在し3.3.3.3経由の方が優先されるように見えますが、ルーティングテーブルを見るとベストパスではない2.2.2.2経由のルートも使用し負荷分散されている様子が読み取れます。 maximum-pathsを使用すると、ベストパスではない経路もルーティングテーブルに載るようになります。 R1#show ip bgp BGP table version is 3, local router ID is 1.1.1.1 Status codes s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S Stale Origin codes i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path * 192.168.100.0 3.3.3.3 0 0 2 i * 2.2.2.2 0 0 2 i R1# R1# R1# R1#show ip route Codes C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route Gateway of last resort is not set 192.168.12.0/25 is subnetted, 2 subnets C 192.168.12.0 is directly connected, Ethernet0/0 O 192.168.12.128 [110/20] via 192.168.12.2, 00 05 04, Ethernet0/0 1.0.0.0/32 is subnetted, 1 subnets C 1.1.1.1 is directly connected, Loopback0 C 192.168.13.0/24 is directly connected, Ethernet0/2 2.0.0.0/32 is subnetted, 1 subnets O 2.2.2.2 [110/11] via 192.168.12.2, 00 05 04, Ethernet0/0 3.0.0.0/32 is subnetted, 1 subnets O 3.3.3.3 [110/11] via 192.168.13.3, 00 05 04, Ethernet0/2 B 192.168.100.0/24 [20/0] via 2.2.2.2, 00 01 24 - 負荷分散 [20/0] via 3.3.3.3, 00 00 04 - 負荷分散 R1# tracerouteによる確認 R1#traceroute Protocol [ip] Target IP address 192.168.100.2 Source address 1.1.1.1 Numeric display [n] y Timeout in seconds [3] Probe count [3] Minimum Time to Live [1] Maximum Time to Live [30] Port Number [33434] Loose, Strict, Record, Timestamp, Verbose[none] Type escape sequence to abort. Tracing the route to 192.168.100.2 1 192.168.12.2 68 msec 192.168.13.3 96 msec * R1# 検証4 負荷分散されない場合 metric設定 maximum-pathsによって負荷分散されるのは、path, metric, LocPrfなどの属性が全て同じ場合のみです。以下のように、metricを定義し、BGP属性が異なる場合について検証します。 R3(config)#route-map MAP_MED permit 10 R3(config-route-map)#set metric 10 R3(config-route-map)#exit R3(config)# R3(config)#router bgp 2 R3(config-router)#neighbor 1.1.1.1 route-map MAP_MED out R3(config-router)#^Z R3# *Mar 1 00 36 51.843 %SYS-5-CONFIG_I Configured from console by console R3# R3#clear ip bgp 1.1.1.1 out R3# ルーティングテーブルの確認 この場合はmetricが異なるので、検証3の時のように負荷分散されません。 R1#show ip bgp BGP table version is 4, local router ID is 1.1.1.1 Status codes s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S Stale Origin codes i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path * 192.168.100.0 3.3.3.3 10 0 2 i - metricが設定された事を確認 * 2.2.2.2 0 0 2 i R1# R1# R1#show ip route Codes C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route Gateway of last resort is not set 192.168.12.0/25 is subnetted, 2 subnets C 192.168.12.0 is directly connected, Ethernet0/0 O 192.168.12.128 [110/20] via 192.168.12.2, 00 06 38, Ethernet0/0 1.0.0.0/32 is subnetted, 1 subnets C 1.1.1.1 is directly connected, Loopback0 C 192.168.13.0/24 is directly connected, Ethernet0/2 2.0.0.0/32 is subnetted, 1 subnets O 2.2.2.2 [110/11] via 192.168.12.2, 00 06 38, Ethernet0/0 3.0.0.0/32 is subnetted, 1 subnets O 3.3.3.3 [110/11] via 192.168.13.3, 00 06 38, Ethernet0/2 B 192.168.100.0/24 [20/0] via 2.2.2.2, 00 00 08 - 負荷分散されていない事を確認 R1#
https://w.atwiki.jp/ajisaibox/pages/37.html
並びは五十音、AtoZ、その他記号の順。 あ か 個体識別番号(こたいしきべつばんごう) ヒューマノイドが個々持っているコード。 AndroidHuman-固有番号/性別/サイズ というように表記される。 性別はMかW、サイズはSMLのいずれか、もしくはオプションで±10cmも可能。 W:S→130cm M→150cm L→170cm M:S→150cm M→170cm L→190cm さ た な は ヒューマノイド 人々がより快適に暮らせるために開発された人型のアンドロイド。 E1からE3までの旧式のAIを搭載した個体は仕事のサポートや代理として、E4以上の新式AIを搭載した個体はカウンセリングや受付、人とのコミュニケーションをとるために使用される。 人のできない仕事、人々があまりやりたがらない仕事を代理として行うこともある。例えば放射性物質など人体に悪影響を与えるものを扱う施設や、死刑執行人など。 ほとんどの個体に銀髪、左目の下の個体識別コードという共通点があるが、特殊な目的のために作られた個体のなかには稀に銀髪でない者もいる。 体重は個体差があり、近年ではどんどん軽量化が進んでいる。 ま マザーコンピュータ 原始のヒューマノイドである三間坂ネムと三間坂シエトのデータが保存されているスーパーコンピュータ。 鏡屋研究所の一室に置かれていて、そこからデータを転送している二人は研究所から出ることができない。 義体に搭載できないほどの莫大な量のデータを保存しているため、原始ながらE5以上の性能があるといわれている。 その実、紛うことなく人間。 や ら わ # E5(いーふぁいぶ) 人間らしい感情やより細かい個別の性格プログラムなどのAIプログラムシステム。 従来の物に比べて容量が大きく回路もまた複雑なため、事案と感情の結びつけの際にエラーが頻発。E5を搭載しているがために、「不良品と思われたくない」という高度な感情を抱くようになり、エラーを隠してしまったことが過大なストレスとなり、結果として自我プログラムが不完全だった666個体の暴走を引き起こす原因となった。 現在では修正がされており、E5(2.0.3) null(ぬる) 常に御岳か畷のそばで浮遊する白い謎の生き物。体の大きさを自由に変えられる。 なお口はなく、飲食はしないので生き物と呼んでいいのかどうかは不明。 666事件(ろくろくろくじけん) 固有番号666個体が起こした大規模ネットワークハックのサイバーテロ。 自我プログラムの暴走で引き起こされた事故と断定され、666個体は処分される。 自我プログラムおよびシステムデータの再構築と、ネットワークの編集権限を剥奪した後続個体は667の番号を与えられ、固有名を八戸見ユーマに代わって八戸見トーマとされた。